<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>BFC解决问题2-margin塌陷</title>
  <style>
    .box {
      width: 500px;
      height: 500px;
      background-color: lightsalmon;
      /* overflow: hidden; */
      /* display: inline-block; */
      /* float: left; */
      position: absolute;
    }
    .box1 {
      width: 100px;
      height: 100px;
      background-color: lightskyblue;
      margin-top: 100px;
    }
  </style>
</head>

<body>
  <!-- BFC的子元素不会对外面的元素产生影响 -->
  <div class="box">
    <div class="box1"></div>
  </div>

  
</body>

</html>